#! /usr/bin/perl
use strict;

my $height = 841.89 - 72;
my $div = 4.162752; # only useful value?

my @x = (100, 490);

while (<>) {
  s/^(\d+): // or next;
  my $p = $1;
  my @y = split / /;
  print <<EOT;
$p:0 g
$p:3 w
EOT
  for (@y) {
    print "$p:", $x[$p%2]," ", $height - $_/$div-10, " m\n";
    print "$p:", $x[$p%2]," ", $height - $_/$div+10, " l\n"; 
  }
  print "$p:s\n";
}
